﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace 常用控件
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            MessageBox.Show("I'm clicked or you use the enter");
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            //this.AcceptButton = button1;
            //this.CancelButton = button1;
            //textBox1.UseSystemPasswordChar = true;
            textBox2.SelectionStart = 5;
            textBox2.SelectionLength = 5;
            richTextBox1.SelectionColor = System.Drawing.Color.Red;

        }

       

        private void textBox3_TextChanged(object sender, EventArgs e)
        {
            label2.Text = textBox3.Text;
        }

        private void richTextBox1_TextChanged(object sender, EventArgs e)
        {
            //richTextBox1.SelectionColor = System.Drawing.Color.Blue;
        }

       

        
    }
}
